package com.ely.coupon.activity.validation;

import com.ely.coupon.activity.validation.constraint.CheckNameValidator;
import com.ely.coupon.activity.validation.constraint.CheckTypeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 保存策略
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})

@Constraint(validatedBy = CheckNameValidator.class)
public @interface CheckName {
    String message() default "参数不合法";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
